//
//  MoreVC.m
//  TestAfn2
//
//  Created by xujingjing on 16/7/11.
//  Copyright © 2016年 xujingjing. All rights reserved.
//

#import "MoreVC.h"
#import "PageScrollView.h"   //菜单切换
#import "MyAlertMessage.h"

#import "ImagePicker.h"
//测试菜单用的四个控制器
#import "TestScrollorBannerVC.h"
#import "ContentViewController.h"
#import "NewAlbunVC.h"
#import "AddressBook.h"
@interface MoreVC (){
    
    ImagePicker *imagePicker;
    
}


@end

@implementation MoreVC

- (void)viewDidLoad {
    
    [super viewDidLoad];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}
//搜索
- (IBAction)searchBtnPressed:(UIButton *)sender {
    
    
    
}


- (IBAction)chooseImage:(UIButton *)sender {
    
    imagePicker = [ImagePicker sharedManager];

    //设置
    [imagePicker setPresentDelegateVC:self InfoDictionaryKeys:(long)nil isAllowMutilSelece:YES choosePhotoMaxNum:3];////InfoDictionaryKeys 暂时保留，单选图片可以传nil，可以0-2
    
    //回调
    [imagePicker dwGetpickerImage:^(UIImage *pickerImagePic) {
        
        [sender setBackgroundImage:pickerImagePic forState:UIControlStateNormal];

    }];
    
  
    
    [imagePicker getMutilImage:^(NSMutableArray *imagesArrPic) {
        
        NSLog(@"imagesArrPic%@",imagesArrPic);
        
    } imagesURLArr:^(NSMutableArray *imagesURLArr) {
        NSLog(@"imagesURLArr%@",imagesURLArr);

        
    } imageNamesArr:^(NSMutableArray *imageNamesArr) {
        NSLog(@"imageNamesArr%@",imageNamesArr);

    }];
    
}

- (IBAction)TestMacroDefinied:(id)sender {
    
    NSArray *arr = $arr(@"d",@"g");
    [arr $first];
   
    ViewRadiusBorderWidth(self.view, 39, 0, ColorWithRandom);
    

    
}

- (IBAction)testMyAlert:(id)sender {
    
    MyAlertMessage * a = [[MyAlertMessage alloc] initWithTitle:@"Hello" WithMessage:@"你猜今天的风是什么口味"];
    
    [a addButton:BUTTON_OK WithTitle:@"香草冰淇淋" WithAction:^(void *action) {
        NSLog(@"Button OK at index 0 click");
    }];
    [a addButton:BUTTON_CANCEL WithTitle:@"酸奶" WithAction:^(void *action) {
        NSLog(@"Button Cancel at index 1 click");
    }];
    [a show];
    
    
}


//菜单，仿今日头条
- (IBAction)menu:(id)sender {
#pragma mark加载storyboard创建的 控制器
 
    TestScrollorBannerVC *tstScrollViewBannervc = (TestScrollorBannerVC*)[STORY instantiateViewControllerWithIdentifier:@"TestScrollorBannerVC"];
    ContentViewController *reactvc = [[ContentViewController alloc]init];
    NewAlbunVC *newalbun = [STORY instantiateViewControllerWithIdentifier:@"NewAlbunVC"];
    AddressBook *address = [STORY instantiateViewControllerWithIdentifier:@"AddressBook"];
    
    NSArray *contentVCArr = @[tstScrollViewBannervc,reactvc,newalbun,address];
    
    
    
    PageScrollView *headScrollView = [[PageScrollView alloc] initWithFrame:self.view.frame headTitleArray:[NSArray arrayWithObjects:@"轮播",@"TableView",@"相册",@"通讯录", nil] ContentVCArr:contentVCArr];
    
    [self.view addSubview:headScrollView];
    

}

@end
